#ifndef DECODER_WAVE_H_
#define DECODER_WAVE_H_

#include "decoder.h"
#include "container_riff.h"

#define WAVE_FORMAT_PCM			0x0001
#define WAVE_FORMAT_IEEE_FLOAT	0x0003
#define WAVE_FORMAT_ALAW		0x0006
#define WAVE_FORMAT_MULAW		0x0007
#define WAVE_FORMAT_EXTENSIBLE	0xFFFE

class DecoderWAVE : public Decoder {

public:
	bool checkFormat(std::string filepath);
	fileInfo getInfo();
	
	void prprForPlayback(fileInfo info);
	void fillBuffers(int16_t *buffer_l, int16_t *buffer_r, uint32_t samples);
	bool reachedEnd();
	void toFirstSample();
	uint32_t getCurrentFrame();

private:
	ContainerRIFF riff;
	bool is_pcm;
	uint8_t bits;
	uint8_t channels;
	uint32_t frame;
};

#endif /* DECODER_WAVE_H_ */

